<div >
    <!--<script type="text/javascript" charset="utf-8" src="static/ueditor/ueditor.config.js"></script>-->
    <!--<script type="text/javascript" charset="utf-8" src="static/ueditor/ueditor.all.min.js"> </script>-->
    <!--&lt;!&ndash;建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败&ndash;&gt;-->
    <!--&lt;!&ndash;这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文&ndash;&gt;-->
    <!--<script type="text/javascript" charset="utf-8" src="static/ueditor/lang/zh-cn/zh-cn.js"></script>-->

    <form class="form-horizontal bv-form"  role="form"  id="addForm">
        <!--去除chrome浏览器自动填充-->
        <input type="password" style="position:absolute;top:-999px"/>
        <fieldset>
            <legend>基本信息</legend>
            <div class="form-group">
                <label class="col-sm-3 control-label">用户名</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="tea_username" placeholder="英文数字均可,不可是汉字">
                </div>
                <span style="color:red;line-height:35px;">*</span>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">密码</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" name="tea_password" >
                </div>
                <span style="color:red;line-height:35px;">*</span>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">确认密码</label>
                <div class="col-sm-8">
                    <input type="password" class="form-control" name="again_password" >
                </div>
                <span style="color:red;line-height:35px;">*</span>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">姓名</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="tea_name" >
                </div>
                <span style="color:red;line-height:35px;">*</span>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">性别</label>
                <div class="col-sm-8">
                    <label style="cursor:pointer"><input type="radio" name="tea_sex" value="1" checked>&nbsp;男</label>&nbsp;&nbsp;&nbsp;
                    <label style="cursor:pointer"><input type="radio" name="tea_sex" value="0">&nbsp;女</label>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">用户头像</label>
                <div class="col-sm-8">
                    <!--<a href="javascript:;" class="file file1">-->
                    <input type="file" name="file" id="file1" onchange="aaaa(this);">
                    <!--</a>-->
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">预览图</label>
                <div class="col-sm-3" id="androimg">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">电话</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="tea_phone" />
                </div>
                <span style="color:red;line-height:35px;">*</span>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">待批改作业数</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" name="tea_homework" >
                </div>
                <span style="color:red;line-height:35px;">*</span>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">状态</label>
                <div class="col-sm-8">
                    <label style="cursor:pointer"><input type="radio" name="tea_status" value="1" checked>启用</label>&nbsp;&nbsp;&nbsp;
                    <label style="cursor:pointer"><input type="radio" name="tea_status" value="2">停用</label>
                </div>
            </div>
        </fieldset>
    </form>
</div>
<script type="text/javascript">

    function aaaa(file) {
        var prevDiv = document.getElementById('androimg');
        if (file.files && file.files[0])
        {
            var reader = new FileReader();
            reader.onload = function(evt){
                prevDiv.innerHTML = '<img src="' + evt.target.result + '" height="150" width="150"/>';
            }
            reader.readAsDataURL(file.files[0]);
        }
        else
        {
            prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
        }
    }
</script>